package com.yidu.menuProject.service;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import com.yidu.menuProject.action.vo.EhyModuleVo;
import com.yidu.menuProject.dao.EhyModuleModelMapper;
import com.yidu.menuProject.dao.EhyRoleModuleModelMapper;
import com.yidu.menuProject.model.EhyModuleModel;
import com.yidu.menuProject.model.EhyRoleModuleModel;





@Service
public class EhyModuleServiceImpl implements EhyModuleService{
	@Resource
	public EhyModuleModelMapper ehyModuleDao;
	
	@Resource
	public EhyRoleModuleModelMapper ehyRoleModuleDao;
	
	
	
	
	@Override
	public int delete(String modId) {
	
		return ehyModuleDao.deleteByPrimaryKey(modId);
	}

	

	@Override
	public EhyModuleVo findById(String id) {
		EhyModuleModel po = new EhyModuleModel();
		EhyModuleVo vo = new EhyModuleVo();
		po = ehyModuleDao.findById(id);
		BeanUtils.copyProperties(po, vo);
		return vo; 
	}



	

	@Override
	public int deleteByPrimaryKey(String modId) {
		return ehyModuleDao.deleteByPrimaryKey(modId);
		
		
	}

	@Override
	public List<EhyModuleModel> selectAll(EhyModuleVo vo) {
		
		return ehyModuleDao.selectAll(vo);
	}

	@Override
	public int selectCount(EhyModuleVo vo) {
		return ehyModuleDao.selectCount(vo);
	}

	@Override
	public List<EhyModuleVo> findByMan(EhyModuleVo vo) {
		
		return null;
	}



	@Override
	public int insertSelective(EhyModuleVo vo) {
		
		return ehyModuleDao.insertSelective(vo);
	}



	@Override
	public int updateByPrimaryKeySelective(EhyModuleVo vo) {
		
		return ehyModuleDao.updateByPrimaryKeySelective(vo);
	}



	@Override
	public List<EhyRoleModuleModel> selectRoleModule(String roleId) {
		
		return ehyRoleModuleDao.selectRoleModule(roleId);
	}



	@Override
	public List<EhyModuleModel> selectModule(EhyModuleVo vo) {
		// TODO Auto-generated method stub
		return ehyModuleDao.selectModule(vo);
	}



	

	

	

	
	
}
